<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>websocket</title>
</head>
<body>

</body>
<script>
    var wsServer = "ws://120.79.71.129:8034";
    var webServer = new WebSocket(wsServer);
    webServer.onopen = function (ev) {
        console.log('onopen');
    }
    webServer.onmessage = function (ev) {
        console.log('onmessage');
    }
    webServer.onclose = function (ev) {
        console.log('onclose');
        console.log(ev.data);
    }
    webServer.onclose = function (ev) {
        console.log('onclose');
    }
</script>
</html>